package com.yango.order.client;

import com.yango.order.client.impl.UserClientImpl;
import com.yango.serviceutil.vo.MemberVo;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @author Li.Ding.yin
 * @create 2021年08月04日19:50-星期三
 * @role 远程调用接口
 */
@Component
@FeignClient(name = "service-user", fallback = UserClientImpl.class)
public interface UserClient {

    //根据用户id获取用户信息
    @ApiOperation(value = "根据用户id获取用户信息")
    @GetMapping("/memberservice/member/getUserInfo/{userId}")
    public MemberVo getUserInfo(@ApiParam(name = "userId", value = "token", required = true)
                                @PathVariable("userId") String userId);
}
